print("[KKB]: Loading Server Side Plugin..")
--Send Shared File To Clients
AddCSLuaFile("kkb/shared/shared.lua")
--Send Panel Files To Clients
AddCSLuaFile("kkb/client/panel_group.lua")
AddCSLuaFile("kkb/client/panel_customusers.lua")
AddCSLuaFile("kkb/client/panel_toolguns.lua")
AddCSLuaFile("kkb/client/panel_vehicles.lua")
AddCSLuaFile("kkb/client/panel_entitys.lua")
AddCSLuaFile("kkb/client/panel_weapons.lua")
AddCSLuaFile("kkb/client/panel_npcs.lua")
AddCSLuaFile("kkb/client/panel_models.lua")
AddCSLuaFile("kkb/client/panel_buddies.lua")
AddCSLuaFile("kkb/client/panel_cleanup.lua")
AddCSLuaFile("kkb/client/panel_general.lua")
AddCSLuaFile("kkb/client/panel_damage.lua")
--Send Settings Reload File To Clients--
AddCSLuaFile("kkb/client/settings_reload.lua")
--Send CPPI File To Clients--
AddCSLuaFile("kkb/client/cppi.lua")

--Include Shared File
include("kkb/shared/shared.lua")
--Include Config File
include("config.lua")
--Load MySQL Files
include("kkb/server/mysql_init.lua")
--Setup The Database
KKB.DBSetup()
--Load More MySQL Files
include("kkb/server/mysql_load.lua")
include("kkb/server/mysql_save.lua")
--Load Info From The Database
KKB.DBLoad()
--Include Server Files
include("kkb/server/settings_reload.lua")
include("kkb/server/settings_change.lua")
include("kkb/server/ent_spawn.lua")
include("kkb/server/toolguns.lua")
include("kkb/server/physguns.lua")
include("kkb/server/cleanup.lua")
--CPPI
include("kkb/server/cppi.lua")

util.AddNetworkString( "KKB_ActivePlayers_Reload" )
local function KKB_PlayerInitialSpawn( Ply )
	net.Start( "KKB_ActivePlayers_Reload" )
	net.Broadcast()
end
hook.Add("PlayerInitialSpawn", "KKB_PlayerInitialSpawn", KKB_PlayerInitialSpawn)

--TODO:
--create poll timer
--polls database for settings changes/new donors

print("[KKB]: Server Side Plugin Loaded!")